package com.dailyblue.java.spring.ioc.annotation.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Data
// 产生了当前类的对象
/*
<bean class="xxx.Student" id="student"></bean>
 */
@Component(value = "stu")
public class Student {
    @Value("1")
    private Integer id;
    @Value("张三")
    private String name;
    @Value("男")
    private Character sex;
    @Value("78.9")
    private Double weight;

    public Student() {
        System.out.println("====>Student类的对象被产生了！");
    }
}
